﻿using RBAC.MaHaiBo.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RBAC.MaHaiBo.Service
{
    /// <summary>
    /// 服务层接口
    /// </summary>
    public interface ILeaveService
    {
        /// <summary>
        /// 反填请假人
        /// </summary>
        /// <param name="Uid">用户编号</param>
        /// <returns>返回数据集合</returns>
        Task<UserInfo> GetUser(int Uid);
        /// <summary>
        /// 显示部门领导
        /// </summary>
        /// <param name="department">部门</param>
        /// <returns>返回数据集合</returns>
        Task<List<UserInfo>> Getdepartment(int department);
        /// <summary>
        /// 添加请假单
        /// </summary>
        /// <param name="leave">要添加的数量</param>
        /// <returns>返回受影响行数</returns>
        Task<int> AddLeave(Leave leave);
        /// <summary>
        /// 分页显示请假列表
        /// </summary>
        /// <param name="poageiden">页码</param>
        /// <param name="pageSzen">页容量</param>
        /// <param name="Name">请假人</param>
        /// <returns>返回数据信息</returns>
        Task<FenYeDTO<LeaveDTo>> GetAllLeave(int poageiden, int pageSzen, string? Name, int Uid, int lSdate, DateTime? Addtime);
        /// <summary>
        /// 反填申请信息
        /// </summary>
        /// <param name="Lid">申请编号</param>
        /// <returns>返回数据信息</returns>
        Task<Leave> GetLeaveinfo(int Lid);
        /// <summary>
        /// 修改信息
        /// </summary>
        /// <param name="leave">修改后的数据信息</param>
        /// <returns>返回受影响行数</returns>
        Task<int> UPdLeave(Leave leave);
        /// <summary>
        /// 审计
        /// </summary>
        /// <param name="Lid">申请编号</param>
        /// <returns>返回受影响行数</returns>
        Task<int>LeaveSJ(int Lid);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Lid">申请编号</param>
        /// <returns>返回受影响行数</returns>
        Task<int> LeaveDel(int Lid);


    }
}
